home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2832 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.0 KB  |  34 lines

  1. Path: news.Gsu.EDU!gs01jpc
  2. From: gs01jpc@panther.Gsu.EDU (J. Patrick Cline)
  3. Newsgroups: comp.lang.c++
  4. Subject: Floating point overflow
  5. Date: 19 Jan 1996 23:29:10 GMT
  6. Organization: Georgia State University
  7. Message-ID: <4dp9g6$spe@sphinx.Gsu.EDU>
  8. NNTP-Posting-Host: panther.gsu.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Why would the following bit of code give me a floating point overflow 
  12. when compiled as a Borland EasyWin target?
  13.  
  14. #include <iostream.h>
  15.  
  16. double someVar;
  17.  
  18. void main() {
  19.    cout << "Enter a float:";
  20.    cin >> someVar;   // Floating point error occurrs after pressing Enter
  21.                      // Works fine as a DOS app
  22. }
  23.  
  24. Thanks, 
  25. Patrick
  26.  
  27. --
  28.             ***************************************************
  29.            |  If Folly is any judge, the happiest man is the   |
  30.            |  one who is most thoroughly deluded.              |
  31.            |  --Desiderius Erasmus, The Praise of Folly        |
  32.            |                                                   |
  33.            |**** http://www2.gsu.edu/~gs01jpc/jpcline.html ****| 
  34.